<script setup>
import { onMounted, ref } from 'vue';
import MyForm from './components/MyForm.vue'

const formRef = ref(null)

onMounted(() => {
  // console.log(formRef.value)

  // 使用子组件的属性和方法
  // console.log(formRef.value.title)
  formRef.value.logTitle()
})

</script>

<template>
  <div>
    <!-- 使用子组件 -->
    <my-form ref="formRef"></my-form>
  </div>
</template>

<style scoped></style>
